{include file="public/header" /}
<body>

<header class="mui-bar mui-bar-nav mui-box-header ">
    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
    <h1 class="mui-title mui-title-box">绑定信用卡</h1>
    <a class="mui-action-back mui-icon mui-icon-compose mui-pull-right"></a>
</header>
<!--<div class="mui-content">-->
    <!--<div class="credit" id="resin">-->
        <!--<div>-->
            <!--<h1 class="credit-title">请绑定持卡人本人的信用卡，卡卡管家保障您的用卡安全，请放心填写。</h1>-->
        <!--</div>-->
        <!--<form >-->
            <!--<div class="credit_list_one">-->
                <!--<form >-->
                    <!--<input type="hidden" name="id" value="{$data.id}">-->
                    <!--<input type="number" class="mui-input-clear real_input"   id="cardone"  placeholder="请输入信用卡卡号"  name="card_number"  disabled value="{$data.card_number}"/>-->
                    <!--<input type="number" class="mui-input-clear real_input"   id="CVN" type="number" placeholder="信用卡背后三维CVN2"  name="CVN2" value="{$data.CVN2}" maxlength="3"/>-->
                    <!--<input type="text" class="mui-input-clear real_input" id="effect" placeholder="请输入信用卡有效期" name="validityDate" maxlength="4"  value="{$data.validityDate}" />-->
                    <!--<input type="text" class="mui-input-clear real_input" id="effect" placeholder="请输入账单日" name="billDate" maxlength="4"  value="{$data.billDate}" />-->
                    <!--<input type="text" class="mui-input-clear real_input" id="effect" placeholder="请输入还款日" name="repayDate" maxlength="4"  value="{$data.repayDate}" />-->
                <!--</form>-->

            <!--</div>-->
        <!--</form>-->
        <!--<div class="mui-content-padded">-->
            <!--<button type="button" id="bound" class="mui-btn mui-btn-danger mui-btn-block">提交</button>-->
            <!--<button type="button" id="add"  data-url="{:url('Index/plan',['id' => $data.id])}" class="mui-btn mui-btn-danger mui-btn-block btn-patterm">新增还款计划</button>-->
        <!--</div>-->

    <!--</div>-->

<!--</div>-->
<div class="mui-content">
    <div class="credit" id="resin">
        <div>
            <h1 class="credit-title">请绑定持卡人本人的信用卡，卡卡管家保障您的用卡安全，请放心填写。</h1>
        </div>
        <form >
            <div class="credit_list_one">
                <input type="hidden" name="id" value="{$data.id}"/>
                <input type="number" class="mui-input-clear real_input bound-list-input"    readonly placeholder="请输入信用卡卡号" name="card_number"  disabled value="{$data.card_number}"/>
                <input type="number" class="mui-input-clear real_input bound-list-input"   placeholder="信用卡背后三维CVN2"  name="CVN2" value="{$data.CVN2}" maxlength="3"/>
                <input type="number" class="mui-input-clear real_input bound-list-input"     placeholder="请输入信用卡有效期"  name="validityDate" maxlength="4"  value="{$data.validityDate}"/>
                <input type="number" class="mui-input-clear real_input bound-list-input"    type="number" placeholder="请输入账单日" name="billDate" maxlength="4"  value="{$data.billDate}" />
                <input type="text" class="mui-input-clear real_input bound-list-input"  placeholder="请输入还款日" name="repayDate" maxlength="4"  value="{$data.repayDate}"  />
            </div>
        </form>
        <div class="mui-content-padded">
            <button type="button"  class="mui-btn mui-btn-danger mui-btn-block btn-patterm bound">提交</button>
            <button type="button"   data-url="{:url('Index/plan',['id' => $data.id])}" class="mui-btn mui-btn-danger mui-btn-block btn-patterm bound">新增还款计划</button>

        </div>

    </div>

</div>

{include file="public/footer" /}
<script>

    $('#submit').on('click',function(){
        var params  = {
            url : "{:url('edit')}",
            data: $('form').serialize(),
            type: 'post',
            sCallback:function(res){
                window.location.href = "{:url('Index/index')}";
            }
        }
        common.request(params);
    });
    $("#add").on('click',function(){
        {if condition="$isRepayPeriod"}
            var url = $(this).data('url');
            window.location.href = url;
        {else /}
        alert('不在还款日期内，不能新建还款计划');
        {/if}


    });
</script>
</body>
</html>
